<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>{$current['title']}-{$Think.CONFIG.title}</title>

		<meta name="keywords" content="{$Think.CONFIG.keywords}" />
		<meta name="description" content="{$Think.CONFIG.description}" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

		<include file="Public/head" />
   </head>

	<body class="no-skin">
		<include file="Public/header" />
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<include file="Public/sidebar" />
			<div class="main-content">
				<div class="main-content-inner">
					<!-- #section:basics/content.breadcrumbs -->
					<include file="Public/breadcrumbs" />

					<!-- /section:basics/content.breadcrumbs -->
					<div class="page-content">
						<include file="Public/set" />

						<!-- /section:settings.box -->
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
									<form class="form-horizontal" id="form" method="post" action="{:U('update')}" >
									<input type="hidden" name="ls_id" value="{$lock_stock.ls_id}" id="ls_id" />
							
									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-1 control-label no-padding-right" for="form-field-1"> device_uuid </label>
										<div class="col-sm-9">
											<input type="text" name="device_uuid" id="device_uuid"  class="col-xs-10 col-sm-5" value="{$lock_stock['device_uuid']}">
											<!--<span class="help-inline col-xs-12 col-sm-7">
												<span class="middle">文章标题不能为空。</span>-->
											</span>
										</div>
									</div>
									<div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-1 control-label no-padding-right" for="form-field-1"> mac_address</label>
										<div class="col-sm-9">
											<input type="text" name="device_address" id="device_address"  class="col-xs-10 col-sm-5" value="{$lock_stock['device_address']}">
										
										</div>
									</div>

									<div class="space-4"></div>

									<div class="form-group">
										<label class="col-sm-1 control-label no-padding-right" for="form-field-2"> device_name</label>
										<div class="col-sm-9">
											<input type="text" name="device_name" id="device_name"  class="col-xs-10 col-sm-5" value="{$lock_stock['device_name']}">
										
										</div>
									</div>

									<div class="space-4"></div>

									
									<div class="form-group">
										<label class="col-sm-1 control-label no-padding-right" for="form-field-2"> serial_number</label>
										<div class="col-sm-9">
											<input type="text" name="serial_number" id="serial_number"  class="col-xs-10 col-sm-5" value="{$lock_stock['serial_number']}">
											
										</div>
									</div>
									</div>
								
								     <div class="space-4"></div>
									<div class="form-group">
										<label class="col-sm-1 control-label no-padding-right" for="form-field-2"> md5_uuid</label>
										<div class="col-sm-9">
											<input type="text" name="md5_device_uuid" id="md5_device_uuid"  class="col-xs-10 col-sm-5" value="{$lock_stock['md5_device_uuid']}">
										
										</div>
									</div>

									<!--
									<div class="space-4"></div>
									
									<div class="form-group">
										<label class="col-sm-1 control-label no-padding-right" for="form-field-2"> 文章内容 </label>
										<div class="col-sm-9">
											<textarea name="content" id="content" style="width:100%;height:400px;visibility:hidden;">{$article['content']}</textarea>
										</div>
									</div>
									-->
                                    
									<div class="col-md-offset-2 col-md-9" style="padding-top:2cm">
										<button class="btn btn-info submit" type="button">
											<i class="icon-ok bigger-110"></i>
											提交
										</button>

										&nbsp; &nbsp; &nbsp;
										<button class="btn" type="reset">
											<i class="icon-undo bigger-110"></i>
											重置
										</button>
									</div>
								</form>
								<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->
			<include file="Public/footer" />
			
		</div><!-- /.main-container -->

		<include file="Public/footerjs" />
		<!-- inline scripts related to this page -->
		<script type="text/javascript">
		
    		
		$(function() {
			var editor = KindEditor.create('textarea[name="content"]',{
				uploadJson : '__PUBLIC__/kindeditor/php/upload_json.php',
				fileManagerJson : '__PUBLIC__/kindeditor/php/file_manager_json.php',
				allowFileManager : true,
				afterBlur:function(){this.sync();}  
				});

			$(".submit").click(function(){
				var  uuid  = $("#device_uuid").val();
				var address = $("#device_address").val();
				var name = $("#device_name").val();
				var serial_number = $("#serial_number").val();	
                var md5_uuid=$("#md5_device_uuid").val();				
                var iscode=/^[0-9]{1,20}$/;
				if(uuid==""){
					bootbox.dialog({
						title: '友情提示：',
						message: "请填写device_uuid。", 
						buttons: {
							"success" : {
								"label" : "确定",
								"className" : "btn-danger"
							}
						}
					});
					return;
				}
				if(address==''){
					bootbox.dialog({
						title: '友情提示：',
						message: "请填写device_address。", 
						buttons: {
							"success" : {
								"label" : "确定",
								"className" : "btn-danger"
							}
						}
					});
					return;
				}
				if(serial_number==''){
					bootbox.dialog({
						title: '友情提示：',
						message: "请填写serial_number。", 
						buttons: {
							"success" : {
								"label" : "确定",
								"className" : "btn-danger"
							}
						}
					});
					return;
					return;
				}
				
				if(md5_uuid==''){
					bootbox.dialog({
						title: '友情提示：',
						message: "请填写md5_device_uuid。", 
						buttons: {
							"success" : {
								"label" : "确定",
								"className" : "btn-danger"
							}
						}
					});
					return;
					return;
				}
				
					
					
				$("#form").submit();
			});
		});
		</script>
	</body>
</html>
